﻿

using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;


public class BLL_tbl_siconideblending
{
    public BLL_tbl_siconideblending()
    {

    }

    public List<tbl_siconideblending> select(int ID)
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        return dal.select(ID);
    }

    public List<tbl_siconideblending> selectAll()
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        return dal.selectAll();
    }

    public DataTable selectAllForGrid()
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        return dal.selectAllForGrid();
    }

    public bool insert(tbl_siconideblending tbl)
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        int i = 0;
        i = dal.insert(
            tbl.Blending_Date
, tbl.Seed_Drum
, tbl.Charge_Number
, tbl.Notes
, tbl.CREATED_BY
, tbl.CREATED_DATE
, tbl.siconideblending_vessels
        );

        return Convert.ToBoolean(i);
    }


    public bool update(tbl_siconideblending tbl)
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        int i = 0;
        i = dal.update(
            tbl.ID
, tbl.Blending_Date
, tbl.Seed_Drum
, tbl.Charge_Number
, tbl.Notes
, tbl.UPDATED_BY
, tbl.UPDATED_DATE
,tbl.siconideblending_vessels
            );

        return Convert.ToBoolean(i);
    }


    public bool delete(tbl_siconideblending tbl)
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        int i = 0;
        i = dal.delete(
                tbl.ID
                ,tbl.siconideblending_vessels
        );

        return Convert.ToBoolean(i);
    }


    public int countsiconideblending_vessels(int SicoNideBlending_id)
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        return dal.countsiconideblending_vessels(SicoNideBlending_id);

    }

    public DataTable getDataSiconideblending_vessels(int SicoNideBlending_id)
    {
        DAL_tbl_siconideblending dal = new DAL_tbl_siconideblending();
        return dal.getDataSiconideblending_vessels(SicoNideBlending_id);

    }

}

